package com.zenithmind.library.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.time.LocalDate;

/**
 * 作者创建DTO
 * 
 * @author ZenithMind
 * @since 2024-06-14
 */
@Data
@Schema(name = "作者创建DTO", description = "创建作者时的数据传输对象")
public class AuthorCreateDTO {

    @NotBlank(message = "作者姓名不能为空")
    @Size(max = 100, message = "作者姓名长度不能超过100个字符")
    @Schema(description = "作者姓名", example = "鲁迅")
    private String name;

    @Size(max = 100, message = "作者英文名长度不能超过100个字符")
    @Schema(description = "作者英文名", example = "Lu Xun")
    private String nameEn;

    @Size(max = 50, message = "笔名长度不能超过50个字符")
    @Schema(description = "笔名", example = "周树人")
    private String penName;

    @Schema(description = "性别 (0-女, 1-男, 2-其他)", example = "1")
    private Integer gender;

    @Schema(description = "出生日期", example = "1881-09-25")
    private LocalDate birthDate;

    @Schema(description = "逝世日期", example = "1936-10-19")
    private LocalDate deathDate;

    @Size(max = 100, message = "国籍长度不能超过100个字符")
    @Schema(description = "国籍", example = "中国")
    private String nationality;

    @Size(max = 2000, message = "作者简介长度不能超过2000个字符")
    @Schema(description = "作者简介")
    private String biography;

    @Schema(description = "作者头像")
    private String avatar;

    @Schema(description = "官方网站")
    private String website;
}
